import instance from '@/utils/myhttp.js'

// 联想数据
function apiThink (key) {
  return instance({
    url: '/app/v1_0/suggestion',
    method: 'get',
    params: {
      q: key
    }
  })
}

// 搜索结果
function apiSearchResult ({ page, perpage, key }) {
  return instance({
    url: '/app/v1_0/search',
    method: 'get',
    params: {
      page: page,
      per_page: perpage,
      q: key
    }
  })
}

export { apiThink, apiSearchResult }
